package com.zhaosc.configbean;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

public class Service extends BaseConfigBean implements InitializingBean,ApplicationContextAware {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5633503124773452261L;

	private String interf;
	private String ref;
	private String protocol;
	private static ApplicationContext application;
	public  static ApplicationContext getApplication(){
		return application;
	}
	
	public String getInterf() {
		return interf;
	}


	public void setInterf(String interf) {
		this.interf = interf;
	}


	public String getRef() {
		return ref;
	}


	public void setRef(String ref) {
		this.ref = ref;
	}


	public String getProtocol() {
		return protocol;
	}


	public void setProtocol(String protocol) {
		this.protocol = protocol;
	}


	@Override
	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
		Service.application=applicationContext;
	}

	@Override
	public void afterPropertiesSet() throws Exception {
		
	}

}
